[
    async function( kuo,Context,context){
        var $THIS = this;
        let $DATA = Object.assign({},this.$DATA);
        $DATA.msg = CDNHOST;
        $DATA.code = 1;
        $DATA.data = {};
        let  $features = await Kuoplus(kuo.class);
        if($features.configure['采集密码']){
            delete($features.configure['采集密码']);
        }
        if($features.configure['通信密码']){
            delete($features.configure['通信密码']);
        }
        $DATA.data.config = $features.configure;
        let $TYPE = [];
        let $db = await db('cms_type');
        let typex =  await $db.Zhicha("id,name,keywords,describes,text1,text2,photo,url,link,int1,char1").Where({subclass:0,off:2,displayswitch:1}).Order("sortsize desc").Select();
        let TUIJIID = [];
        if(typex){
            for(var xx  in typex){
                let xxx = typex[xx];
                TUIJIID.push(xxx.id);
                $TYPE.push($THIS.JieData(xxx));
            }
        }
        $DATA.data.type = $TYPE;
        let Num  = Mode("Tools").Int($features.configure['列表页码']?$features.configure['列表页码'][0]:10);
        if(Num < 1){
            Num = 5;
        }
        $DATA.data.tuijian = {};
        if(TUIJIID && TUIJIID.length > 0){
            $db = await $db.SetTable('cms_content');
           
            for(var m in TUIJIID){
                let id = TUIJIID[m];
                $DATA.data.tuijian[id] = [];
                let typex =  await $db.Where({'subclass IN': await $THIS.TYPE_BAOHAN(id),'off':2}).Order("sortsize desc,id desc").Limit(Num).Select();
                if(typex){
                    let $TYPE = [];
                    for(var xx  in typex){
                        let xxx = typex[xx];
                        $TYPE.push($THIS.JieData(xxx,$features.configure['隐藏字段']));
                    }
                    $DATA.data.tuijian[id] =  $TYPE;
                }
            }
        }
        return  json_encode($DATA);
    }
]